﻿using System;
using System.Linq.Expressions;
using Library.Distributed;

namespace Library.Linq.Expressions
{
    public class NodeIndexExpression : DistributedExpression
    {
        internal NodeIndexExpression() { }

        public override Type Type
        {
            get
            {
                return typeof(Context).GetProperty("NodeIndex").PropertyType;
            }
        }

        public override Expression Reduce()
        {
            return Expression.Property(Context_Current, typeof(Context).GetProperty("NodeIndex"));
        }
    }
}
